<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<html lang="en" class="no-js">
    <head>
        <meta charset="utf-8">
        <title>球队管理系统</title>
		<meta name="keywords" content="球队管理系统移动端登录" />
		<meta name="description" content="球队管理系统移动端登录" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <%@include file="/assets/common/base.jsp" %>

<script language="javascript">
var path = "<%=path%>";
$(document).ready(function(){
	var login_error = args.login_error;
	if(login_error=="1"){
		$("#strMessage").text("用户名或密码错误，登录失败!");
		//alert("用户名或密码错误，登录失败!");
	}
});
$(document).ready(function(){
	var fields = $(":input");
	for (var i = 0; i < fields.length; i++) {
	  fields[i].autocomplete="on";   
	}
});
</script>
        <!-- CSS -->
        <link rel="stylesheet" href="<%=path%>/assets/supersized/css/reset.css">
        <link rel="stylesheet" href="<%=path%>/assets/supersized/css/supersized.css">
        <link rel="stylesheet" href="<%=path%>/assets/supersized/css/style.css">
        
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

    </head>

    <body>
        <div class="page-container">
            <h1>欢迎登录</h1>
            <form name="logonform" id="logonform" method="post" action="<%=path%>/j_spring_security_check">
                <input type="text" id="j_username" name="j_username" class="username" placeholder="用户名">
                <input type="password" id="j_password" name="j_password" class="password" placeholder="密码">
                <button type="submit" onclick="submit_form()">提交</button>
                <!--input type="button" onclick="submit_form()" value="提交"></input-->
                <div class="error"><span>+</span></div>
            </form>
            <br><p id="strMessage" style="COLOR:red"></p>
            <div class="connect">
                <p>Or connect with:</p>
                <p>
                    <a class="facebook" href=""></a>
                    <a class="twitter" href=""></a>
                </p>
            </div>
        </div>
        <!-- Javascript -->
        <script src="<%=path%>/assets/js/jquery.min.js"></script>
        <script src="<%=path%>/assets/supersized/js/supersized.3.2.7.min.js"></script>
        <script src="<%=path%>/assets/supersized/js/supersized-init.js"></script>
        <script src="<%=path%>/assets/supersized/js/scripts.js"></script>

    </body>
<script language="javascript">
var sumbitted = false;
function submit_form(){
  if (!sumbitted){
	  var username = document.getElementById("j_username").value;
	  var password = document.getElementById("j_password").value;
	  
	  if (username.length>0&&password.length>0){
	  	  document.getElementById("logonform").submit();
		  sumbitted = true;				
	  }
	  else{
		  alert("请输入用户名和密码。");
	  }
  }
}
</script>
</html>
